package com.youmu.shop.coupon.bean;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

public class Coupon implements Serializable{
    /**
     * 优惠券主键
     * 表字段 : xx_coupon.id
     */
    private Long id;

    /**
     * 优惠券名称
     * 表字段 : xx_coupon.name
     */
    private String name;

    /**
     * 优惠券前缀名
     * 表字段 : xx_coupon.prefix
     */
    private String prefix;

    /**
     * 优惠券使用起始日期
     * 表字段 : xx_coupon.begin_date
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date beginDate;

    /**
     * 优惠券使用截止日期
     * 表字段 : xx_coupon.end_date
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endDate;

    /**
     * 最小商品数量
     * 表字段 : xx_coupon.minimum_quantity
     */
    private Integer minimumQuantity;

    /**
     * 最低s商品价格
     * 表字段 : xx_coupon.minimum_price
     */
    private BigDecimal minimumPrice;

    /**
     * 最大商品数量
     * 表字段 : xx_coupon.maximum_quantity
     */
    private Integer maximumQuantity;

    /**
     * 最高商品价格
     * 表字段 : xx_coupon.maximum_price
     */
    private BigDecimal maximumPrice;

    /**
     * 优惠券代金金额
     * 表字段 : xx_coupon.price_expression
     */
    private String priceExpression;

    /**
     * 优惠券是否启用
     * 表字段 : xx_coupon.is_enabled
     */
    private Boolean isEnabled;

    /**
     * 是否允许积分兑换
     * 表字段 : xx_coupon.is_exchange
     */
    private Boolean isExchange;

    /**
     * 优惠券积分兑换数
     * 表字段 : xx_coupon.point
     */
    private Integer point;

    /**
     * 优惠券排序位
     * 表字段 : xx_coupon.orders
     */
    private Integer orders;

    /**
     * 优惠券创建时间
     * 表字段 : xx_coupon.create_date
     */
    private Date createDate;

    /**
     * 优惠券最新修改时间
     * 表字段 : xx_coupon.modify_date
     */
    private Date modifyDate;

    /**
     * 优惠券介绍
     * 表字段 : xx_coupon.introduction
     */
    private String introduction;
    
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table xx_coupon
     *
     * @mbg.generated
     */
    private static final long serialVersionUID = 1L;
    /**
     * 商品种类主键
     */
    private String productCategoryIds;
    /**
     * 会员等级主键
     */
    private String memberRankIds;
    
    /**
     * 开始时间字符串
     */
    private String beginDateStr;
    /**
     * 结束时间字符串
     */
    private String endDateStr;
    /**
     *	是否启用标识
     */
    private Integer isEnabledFlag;
    /**
     * 优惠券抵扣金额
     */
    private BigDecimal amount;
    /**
     * 开始时间
     */
    private String startDate;
    /**
     * 描述
     */
    private String introduce;
    /**
     * 优惠码id
     */
    private Long couponCode;
    
	public Long getCouponCode() {
		return couponCode;
	}

	public void setCouponCode(Long couponCode) {
		this.couponCode = couponCode;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public String getStartDate() {
		return startDate;
	}

	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}

	public String getIntroduce() {
		return introduce;
	}

	public void setIntroduce(String introduce) {
		this.introduce = introduce;
	}

	public Integer getIsEnabledFlag() {
		return isEnabledFlag;
	}

	public void setIsEnabledFlag(Integer isEnabledFlag) {
		this.isEnabledFlag = isEnabledFlag;
	}

	public String getBeginDateStr() {
		return beginDateStr;
	}

	public void setBeginDateStr(String beginDateStr) {
		this.beginDateStr = beginDateStr;
	}

	public String getEndDateStr() {
		return endDateStr;
	}

	public void setEndDateStr(String endDateStr) {
		this.endDateStr = endDateStr;
	}

	public String getProductCategoryIds() {
		return productCategoryIds;
	}

	public void setProductCategoryIds(String productCategoryIds) {
		this.productCategoryIds = productCategoryIds;
	}

	public String getMemberRankIds() {
		return memberRankIds;
	}

	public void setMemberRankIds(String memberRankIds) {
		this.memberRankIds = memberRankIds;
	}

	public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getPrefix() {
        return prefix;
    }

    public void setPrefix(String prefix) {
        this.prefix = prefix == null ? null : prefix.trim();
    }

    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Integer getMinimumQuantity() {
        return minimumQuantity;
    }

    public void setMinimumQuantity(Integer minimumQuantity) {
        this.minimumQuantity = minimumQuantity;
    }

    public BigDecimal getMinimumPrice() {
        return minimumPrice;
    }

    public void setMinimumPrice(BigDecimal minimumPrice) {
        this.minimumPrice = minimumPrice;
    }

    public Integer getMaximumQuantity() {
        return maximumQuantity;
    }

    public void setMaximumQuantity(Integer maximumQuantity) {
        this.maximumQuantity = maximumQuantity;
    }

    public BigDecimal getMaximumPrice() {
        return maximumPrice;
    }

    public void setMaximumPrice(BigDecimal maximumPrice) {
        this.maximumPrice = maximumPrice;
    }

    public String getPriceExpression() {
        return priceExpression;
    }

    public void setPriceExpression(String priceExpression) {
        this.priceExpression = priceExpression == null ? null : priceExpression.trim();
    }

    public Boolean getIsEnabled() {
        return isEnabled;
    }

    public void setIsEnabled(Boolean isEnabled) {
        this.isEnabled = isEnabled;
    }

    public Boolean getIsExchange() {
        return isExchange;
    }

    public void setIsExchange(Boolean isExchange) {
        this.isExchange = isExchange;
    }

    public Integer getPoint() {
        return point;
    }

    public void setPoint(Integer point) {
        this.point = point;
    }

    public Integer getOrders() {
        return orders;
    }

    public void setOrders(Integer orders) {
        this.orders = orders;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction == null ? null : introduction.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", prefix=").append(prefix);
        sb.append(", beginDate=").append(beginDate);
        sb.append(", endDate=").append(endDate);
        sb.append(", minimumQuantity=").append(minimumQuantity);
        sb.append(", minimumPrice=").append(minimumPrice);
        sb.append(", maximumQuantity=").append(maximumQuantity);
        sb.append(", maximumPrice=").append(maximumPrice);
        sb.append(", priceExpression=").append(priceExpression);
        sb.append(", isEnabled=").append(isEnabled);
        sb.append(", isExchange=").append(isExchange);
        sb.append(", point=").append(point);
        sb.append(", orders=").append(orders);
        sb.append(", createDate=").append(createDate);
        sb.append(", modifyDate=").append(modifyDate);
        sb.append(", introduction=").append(introduction);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}